---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: prometheus-module
  namespace: d8-monitoring
  {{- include "helm_lib_module_labels" (list . (dict "prometheus" "main")) | nindent 2 }}
spec:
  jobLabel: app
  sampleLimit: 100000
  endpoints:
  - port: https
    scheme: https
    bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    tlsConfig:
      insecureSkipVerify: true
    honorLabels: true
    relabelings:
    - targetLabel: tier
      replacement: cluster
  selector:
    matchLabels:
      app: prometheus
  namespaceSelector:
    matchNames:
    - d8-monitoring
